package com.ruoyi.garbage.service.impl;

import com.ruoyi.garbage.domain.SlideShow;
import com.ruoyi.garbage.mapper.SlideShowMapper;
import com.ruoyi.garbage.service.ISlideShowService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 幻灯片播放Service业务层处理
 *
 * @author 刘哲贤
 * @date 2023-01-07
 */
@Service
public class SlideShowServiceImpl implements ISlideShowService {
    @Resource
    private SlideShowMapper slideShowMapper;

    /**
     * 查询幻灯片播放
     *
     * @param slide 幻灯片播放主键
     * @return 幻灯片播放
     */
    @Override
    public SlideShow selectSlideShowBySlide(Long slide) {
        return slideShowMapper.selectSlideShowBySlide(slide);
    }

    /**
     * 查询幻灯片播放列表
     *
     * @param slideShow 幻灯片播放
     * @return 幻灯片播放
     */
    @Override
    public List<SlideShow> selectSlideShowList(SlideShow slideShow) {
        return slideShowMapper.selectSlideShowList(slideShow);
    }

    /**
     * 新增幻灯片播放
     *
     * @param slideShow 幻灯片播放
     * @return 结果
     */
    @Override
    public int insertSlideShow(SlideShow slideShow) {
        return slideShowMapper.insertSlideShow(slideShow);
    }

    /**
     * 修改幻灯片播放
     *
     * @param slideShow 幻灯片播放
     * @return 结果
     */
    @Override
    public int updateSlideShow(SlideShow slideShow) {
        return slideShowMapper.updateSlideShow(slideShow);
    }

    /**
     * 批量删除幻灯片播放
     *
     * @param slides 需要删除的幻灯片播放主键
     * @return 结果
     */
    @Override
    public int deleteSlideShowBySlides(Long[] slides) {
        return slideShowMapper.deleteSlideShowBySlides(slides);
    }

    /**
     * 删除幻灯片播放信息
     *
     * @param slide 幻灯片播放主键
     * @return 结果
     */
    @Override
    public int deleteSlideShowBySlide(Long slide) {
        return slideShowMapper.deleteSlideShowBySlide(slide);
    }
}
